package com.agan.jvm.test03.lesson02;

import java.util.ArrayList;
import java.util.List;
/**
 * @author 阿甘
 * @see https://study.163.com/course/introduction/1211562809.htm?share=1&shareId=1028852228
 * @version 1.0
 * 注：如有任何疑问,欢迎加阿甘老师微信agan-java 进行讨论
 */
public class Father {

    private List<Son> sons=new ArrayList<Son>();

    public Son giveSon(String name ){
        return new Son(name);
    }

    public static void main(String[] args) {

        Father father=new Father();

        Son a=father.giveSon("a");
        father.sons.add(a);

        father.giveSon("b");
    }

}
